package com.spring.springmvc.表白墙;


import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ImessageInfo {


    @Result(column = "message",property = "say")
    @Insert("insert into message_info (`from`,`to`,`message`) values (#{from},#{to},#{say})")
    Integer insertMessageInfo(Message message);

    @Select("select * from message_info")
    List<Message>  selectMessage();

}
